import Link from "next/link";
import LogoutForm from "@/components/logoutForm";
import {getSession} from "@/actions";

export default async function Navbar() {
    const session = await getSession();
    return (
        <nav className="flex items-center gap-4">
            <Link href="/" className="text-2xl bg-yellow-200">Homepage</Link>
            <Link href="/premium" className="text-2xl bg-gray-300">Premium</Link>
            <Link href="/profile" className="text-2xl bg-green-500">Profile</Link>
            <Link href="/login" className="text-2xl bg-red-400">Login</Link>
            {session.isLoggedIn && <LogoutForm />}
        </nav>
    )
}